<template>
  <div class="graphic-layout">
    <div class="d-content">
      <img :src="componentData.coverImage" alt="" />
      <p class="blue ft-30 ft-bold">{{ componentData[`title${capitalizeLang}`] }}</p>
      <p class="ft-24 mt-12">
        {{ componentData[`content${capitalizeLang}`] }}
      </p>
      <div class="btn">
        <div v-for="icon in componentData.icon" :key="icon.id" class="btn-item">
          <img :src="icon.url" alt="" />
          <span class="ft-8 mt-10">{{ icon[`title${capitalizeLang}`] }}</span>
          <span class="ft-8">{{ icon[`subtitle${capitalizeLang}`] }}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  props: {
    componentData: {
      type: Object,
      default: () => ({}),
    },
  },
  data() {
    return {}
  },
  computed: {
    ...mapGetters(['capitalizeLang']),
  },
  methods: {},
}
</script>

<style lang="less" scoped>
@import '~assets/var';

.graphic-layout {
  position: relative;
  background-color: #fff;

  .d-content {
    background: #f6f7f9;
    margin: 0 24px 30px 24px;
    padding: 30px 24px;

    img {
      width: 100%;
      margin-bottom: 32px;
    }

    .btn {
      display: flex;
      font-size: 12px;
      color: #0261bc;
      justify-content: flex-end;
      margin-top: 20px;

      .btn-item {
        display: flex;
        flex-direction: column;
        text-align: center;
        margin-left: 20px;
        overflow: hidden;
        max-width: 84px;

        img {
          width: 44px;
          height: 44px;
          margin: 0 auto;
          filter: drop-shadow(#0261bc 100px 0); // 在右侧 100px 加一个 #FFF 的阴影
          transform: translateX(-100px);
        }

        .ft-8 {
          font-size: 20px;
          line-height: 20px;
          margin-top: 8px;
          display: inline-block;
          zoom: 0.5;
        }

        .mt-10 {
          margin-top: 10px;
        }
      }
    }
  }

  .ft-30 {
    font-size: 30px;
  }

  .t-24 {
    font-size: 24px;
  }
}
</style>
